// token代表唯一标识符，相当于身份证号
import axios from 'axios';
axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';


const token = '1ec949a15fb709370f';
const baseUrl = 'http://vueshop.glbuys.com';
// const baseUrl = 'http://169.254.200.2:8080';
// 推荐接口
export function indexRecommend(token){
    return axios.get(baseUrl + "/api/home/index/recom?token="+token)
                .then((res) => {
        return res;
    })
}

// 导航分类
export function indexSlide(token){
    return axios.get(baseUrl + "/api/home/index/nav?token="+ token).then((res) => {
        // console.log("导航",res.data.data);
        // this.arr = res.data.data;
        return res;
    })
}

// 登录接口
export function login(param) {
  return axios.post(baseUrl + "/api/home/user/pwdlogin?token=" + token, param).then(res => res);

}

// 注册接口
export function reg(param){
    return axios.post(baseUrl + "/api/home/user/reg?token=" + token, param).then(res => res);

}

// 18201030666  123456
